module.exports = function(grunt) {  
  //配置参数
  grunt.initConfig({
     pkg: grunt.file.readJSON('package.json'),  
     concat: {
         options: {
             separator: '\n',
             stripBanners: true
         },
         dist: {
             src: [
                 "public/js/common/controller/frame.js",
                 "public/js/common/controller/hashChange.js",
                 "public/js/common/controller/leftMenu.js"
             ],
             dest: "public/js/common/controller/controller.js"
         }
     },
     uglify: {
         options: {
         },
         dist: {
             files: {
                 'public/js/common/controller/controller.min.js': 'public/js/common/controller/controller.js'
             }
         }
     },
     cssmin: {
         options: {
             keepSpecialComments: 0
         },
         compress: {
             files: {
                 'public/css/opm-v2.css': [
                     "public/css/common.css",
                     "public/css/login.css",
                     "public/css/role.css"
                 ]
             }
         }
     }
  });  
   
  //载入concat和uglify插件，分别对于合并和压缩  
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
   
  //注册任务  
  grunt.registerTask('default', ['concat','uglify','cssmin']);
};